$(function() {
	$("[name='submit']").click(function() {
		var box = $("[name='file']")[0];
		var _path = $("[name='file']").value;
		console.log("_path:" + _path)
		var reader = new FileReader();
		console.log(box);
		var data = new FormData();
		$file = box.files[0];
		if ($file) {
			data.append({'binary': $file});
		};
		console.log('data', data);
		// console.log(data.size)
		// console.log($file);
		// box.select();
		var u = document.selection;
		console.log(u);
		$.ajax({
			cache: false,
			// sync: false,
			// secureuri: false,
			url: "/api/complex/test",
			type: "post",
			// data: fd,
			enctype: 'multipart/form-data',
			processData: false, // tell jQuery not to process the data
			// contentType: false, // tell jQuery not to set contentType
			// enctype: "multipart/form-data",
			dateType: "json",
			data: data,
			// fileElementId: 'txtImage',
			success: function(result) {

			},
			error: function(err) {
				alert("连接超时，请稍后检查网络后重试！！！");
				console.log(err);
			}
		})
	})
})